package com.cloud.service;

import com.cloud.common.result.Result;
import com.cloud.service.impl.PaymentHystrixServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "CLOUD-PAYMENT-HYSTRIX-SERVICE" ,fallback = PaymentHystrixServiceImpl.class)
public interface PaymentHystrixService {
    @GetMapping(value = "/paymentDefault/hystrix/ok/{id}")
    Result paymentFeignOK(@PathVariable("id") Integer id);

    @GetMapping(value = "/paymentDefault/hystrix/timeout/{timeout}")
    Result paymentFeignTimeout(@PathVariable("timeout") Long timeout);
}
